/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.myapp.svc.comentarios;

import com.myapp.model.DAO.Comments.CommentsDao;
import com.myapp.model.comentarios.Comentarios;
import com.myapp.model.ejercicios.Ejercicios;
import java.util.List;

/**
 *
 * @author Tarde
 */
public class ComentariosSvc {

    CommentsDao comDao = new CommentsDao();

    public Comentarios listarPorId(String idComentario) {
        Comentarios com = new Comentarios();
        com = comDao.listCommentById(idComentario);
        return com;
    }

    public void reportarComments(Comentarios com) {
        comDao.reportarComment(com);
    }

    public void insertarComentarioEjercicio(Comentarios com) {

        comDao.insertarComentarioEjercicio(com);

    }
    
    public List<Comentarios> listCommentByIdExercise(Ejercicios idEj) {
        
        CommentsDao dao = new CommentsDao();
        
        List<Comentarios> lista = dao.listCommentByIdExercise(idEj);        
        
        return lista;

    }
    
    public void eliminarComentario(Comentarios com) {

        comDao.eliminarComentario(com);

    }
}
